/*
 * Container.h
 */
#ifndef _CONTAINER_H_
#define _CONTAINER_H_

#include <allegro.h>
#include <vector>

#include "defs.h"
#include "Component.h"

namespace gui
  {

    class Container : public Component
      {

      protected:
        std::vector<Component*> _content;

      public:
        virtual void add(Component& component);
        virtual Component* get(int index);
        virtual int count() const;

        virtual void paint(BITMAP* buffer, int x_offset, int y_offset);
        virtual void paintChildren(BITMAP* buffer, int x_offset, int y_offset);

        virtual void mask(BITMAP* buffer, int x_offset, int y_offset);
        virtual void maskChildren(BITMAP* buffer, int x_offset, int y_offset);

      };

  }

#endif
